import PageTools from './PageTools'
import UploadExcel from './UploadExcel'
import ImageUpload from './ImageUpload'
// Vue.use()=>调用里面的install方法
export default {
  // 会传入Vue对象
  install(Vue) {
    // 注册全局的通用栏组件对象
    Vue.component('PageTools', PageTools)
    Vue.component('UploadExcel', UploadExcel)
    Vue.component('ImageUpload', ImageUpload)

    // $sleep 强制休眠   休眠函数
    Vue.prototype.$sleep = function(timer = 500) {
      return new Promise(resolve => {
        setTimeout(() => resolve(), timer)
      })
    }
  }
}
